package com.yvon.maple.service.msg.core.model.dto;

import cn.hutool.core.date.DatePattern;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yvon.maple.pojo.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 消息响应结果
 *
 * @author : Yvon
 * @since : 2021-09-02
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel("消息响应参数")
public class ImContentDTO extends BaseDTO implements Serializable {
    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -7194140738003303454L;

    /**
     * 标题
     */
    @ApiModelProperty(name = "title", value = "标题")
    private String title;

    /**
     * 内容
     */
    @ApiModelProperty(name = "content", value = "内容")
    private String content;

    /**
     * 类型
     */
    @ApiModelProperty(name = "typeCode", value = "类型")
    private String typeCode;

    /**
     * 类型名称
     */
    @ApiModelProperty(name = "typeName", value = "类型名称")
    private String typeName;

    /**
     * 额外信息
     */
    @ApiModelProperty(name = "extras", value = "额外信息")
    private JSONObject extras;

    /**
     * 消费者编号
     */
    @ApiModelProperty(name = "consumerId", value = "消费者编号")
    private String consumerId;

    /**
     * 是否阅读
     */
    @ApiModelProperty(name = "read", value = "是否阅读")
    private Boolean read;

    /**
     * 阅读时间
     */
    @ApiModelProperty(name = "readTime", value = "阅读时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime readTime;
}
